<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@taglib uri="http://richfaces.org/rich" prefix="rich"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<f:view>
    <h:form>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <LINK rel="stylesheet" type="text/css" href="commun_styles.css"/>
        <title>Authentification</title>
    </head>
    <body>
        <rich:spacer height="200px"/>
        <center>
            <rich:panel id="logpan" header="Authentification" style="background-image:url(#{facesContext.externalContext.requestContextPath}/images/login_icon.png);
                        background-repeat:no-repeat;background-position:-35px -15px;
                        width:400px;" styleClass="panel_3">
                <h:panelGrid columns="3">
                    <h:outputText value="Login :" />
                    <h:inputText id="log" value="#{LoginBean.login}" required="true" requiredMessage="champ obligatoire" />
                    <rich:message for="log" style="color: red" />
                    <h:outputText value="Mot de passe :" />
                    <h:inputSecret id="mdp" value="#{LoginBean.password}" required="true" requiredMessage="champ obligatoire" />
                    <rich:message for="mdp" style="color: red" />
                </h:panelGrid>
                <rich:spacer height="30px"></rich:spacer>
                <a4j:commandButton value="Connexion" action="#{LoginBean.connecter}" reRender="logpan" />
            </rich:panel>
        </center>
    </body>
</html>
</h:form>
</f:view>